Sizers
Table of Contents

Automatically manage resizing controls


Sizers take care of resizing and repositioning controls within a window whenever the window is resized. Sizers may be nested within each other to create complex relationships between the controls in a window. The most common sizer used will be the wxBoxSizer.

  • proc add_sizer_to_sizer( atom sizer1, atom sizer2, atom option, atom flag, atom border )   
  • proc add_window_to_sizer( atom sizer, atom window, atom option, atom flag, atom border )   
  • func fit_window( atom sizer, atom window )   
  • func get_sizer_minsize( atom sizer )   
  • func get_sizer_position( atom sizer )   
  • func get_sizer_size( atom sizer )   
  • proc set_sizer( atom window, atom sizer )   
  • func sizer_calc_min( atom sizer )   
  • proc space_sizer( atom sizer, atom width, atom height, atom option, atom flag, atom border)     
     
    Subtopics:
  • wxBoxSizer
  • wxFlexGridSizer
  • wxGridSizer
  • wxSplitterWindow
  • wxStaticBoxSizer

    Sizers
    Table of Contents

    [proc]
    add_sizer_to_sizer
    ( atom sizer1, atom sizer2, atom option, atom flag, atom border )

    Category: Sizers

    This adds sizer2 to sizer1.

    See Also: add_window_to_sizer, fit_window, get_sizer_minsize, get_sizer_position, get_sizer_size, set_sizer, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [proc]
    add_window_to_sizer
    ( atom sizer, atom window, atom option, atom flag, atom border )

    Category: Sizers

    This adds the specified window (i.e., control) to the sizer.

    See Also: add_sizer_to_sizer, fit_window, get_sizer_minsize, get_sizer_position, get_sizer_size, set_sizer, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [func]
    fit_window
    ( atom sizer, atom window )

    Category: Sizers

    Tell the sizer to resize the window to match the sizer's minimal size. Returns the new size.

    See Also: add_sizer_to_sizer, add_window_to_sizer, get_sizer_minsize, get_sizer_position, get_sizer_size, set_sizer, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [func]
    get_sizer_minsize
    ( atom sizer )

    Category: Sizers

    Returns the minimal size of the sizer. This is either the combined minimal size of all the children and their borders or the minimal size set by SetMinSize, epending on which is bigger

    See Also: add_sizer_to_sizer, add_window_to_sizer, fit_window, get_sizer_position, get_sizer_size, set_sizer, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [func]
    get_sizer_position
    ( atom sizer )

    Category: Sizers

    Returns the current position of the sizer.

    See Also: add_sizer_to_sizer, add_window_to_sizer, fit_window, get_sizer_minsize, get_sizer_size, set_sizer, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [func]
    get_sizer_size
    ( atom sizer )

    Category: Sizers

    Returns the current size of the sizer.

    See Also: add_sizer_to_sizer, add_window_to_sizer, fit_window, get_sizer_minsize, get_sizer_position, set_sizer, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [proc]
    set_sizer
    ( atom window, atom sizer )

    Category: Sizers

    This must be called before a sizer will resize its children. window is the parent window of the controls to be resized. The sizer will resize and reposition its children based on window.

    See Also: add_sizer_to_sizer, add_window_to_sizer, fit_window, get_sizer_minsize, get_sizer_position, get_sizer_size, sizer_calc_min, space_sizer


    Sizers
    Table of Contents

    [func]
    sizer_calc_min
    ( atom sizer )

    Category: Sizers

    Here, the sizer will do the actual calculation of its children minimal sizes. The size is returned as a sequence.

    See Also: add_sizer_to_sizer, add_window_to_sizer, fit_window, get_sizer_minsize, get_sizer_position, get_sizer_size, set_sizer, space_sizer


    Sizers
    Table of Contents

    [proc]
    space_sizer
    ( atom sizer, atom width, atom height, atom option, atom flag, atom border)

    Category: Sizers

    Adds a blank region to the sizer in order to space controls within a sizer.

    See Also: add_sizer_to_sizer, add_window_to_sizer, fit_window, get_sizer_minsize, get_sizer_position, get_sizer_size, set_sizer, sizer_calc_min